package com.easyweb.session;

import com.easyweb.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("bayiGpsList")
public class BayiGpsList extends EntityQuery<BayiGps> {

	private static final String EJBQL = "select bayiGps from BayiGps bayiGps";

	private static final String[] RESTRICTIONS = {
			"lower(bayiGps.latitude) like lower(concat(#{bayiGpsList.bayiGps.latitude},'%'))",
			"lower(bayiGps.longitude) like lower(concat(#{bayiGpsList.bayiGps.longitude},'%'))",
			"lower(bayiGps.type) like lower(concat(#{bayiGpsList.bayiGps.type},'%'))", };

	private BayiGps bayiGps = new BayiGps();

	public BayiGpsList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public BayiGps getBayiGps() {
		return bayiGps;
	}
}
